import type { ItemBaseProps } from '@/desktop/logics/contacts'
import type { InternalContact, NoticeContact } from '@/services/contact-types'
import ContactItemContent from './content'
import { Menu, menuItems } from './menu'

export default function InternalItem(
  props: ItemBaseProps & {
    contact: InternalContact | NoticeContact
  },
) {
  const { contact, isTop, unread } = props

  const side = <Menu
    items={[menuItems.top(contact.id, isTop), menuItems.markUnread(contact.id, unread)]}
  />

  return <ContactItemContent {...props} side={side} />
}
